package com.erp.action;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.erp.service.InitService;
import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
@Controller(value = "initAction")
@Scope(value = "prototype")
public class InitAction extends ActionSupport {

	private InitService initService;

	public InitService getInitService() {
		return initService;
	}

	@Resource(name = "initService")
	public void setInitService(InitService initService) {
		this.initService = initService;
	}

	@Override
	public String execute() throws Exception {
		initService.init();
		return super.execute();
	}

}
